package com.foreknow.elm.dao;

import com.foreknow.elm.po.Deliveryaddress;

import java.util.List;

public interface DeliveryAddressDao {
    /**
     * 根据用户编号查询所属送货地址
     * @param userId
     * @return deliveryAddress数组
     */
    List<Deliveryaddress> listDeliveryAddressByUserId(String userId) throws Exception;

    /**
     * 根据送货地址编号查询送货地址
     * @param daId
     * @return deliveryAddress对象
     * @throws Exception
     */
    Deliveryaddress getDeliveryAddressById(int daId) throws Exception;

    /**
     * 向送货地址表中添加一条记录
     * @param deliveryaddress
     * @return
     * @throws Exception
     */
    int saveDeliveryAddress(Deliveryaddress deliveryaddress) throws Exception;

    /**
     * 根据送货地址编号更新送货地址信息
     * @param deliveryaddress
     * @return
     * @throws Exception
     */
    int updateDeliveryAddress(Deliveryaddress deliveryaddress) throws Exception;

    /**
     * 根据送货地址编号删除一条记录
     * @param daId
     * @return
     * @throws Exception
     */
    int removeDeliveryAddress(int daId) throws Exception;
}
